import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect:'/index',
      component: HomeView,
      children:[
        {
          path: '/index',
          component: () => import('../views/IndexView.vue')
        },
        {
          path: '/system/center',
          component: () => import('../views/system/MyCenterView.vue')
        },
        {
          path: '/system/dic',
          component: () => import('../views/system/DicView.vue')
        },
        {
          path: '/system/log',
          component: () => import('../views/system/LogView.vue')
        }
      ]
    },
    {
      path: '/login',
      component: () => import('../views/LoginView.vue')
    },
  ],
})

export default router
